<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template name="lf2br">
 <xsl:param name="text"/>
 <xsl:choose>
   <xsl:when test="contains($text,'&#10;')">
     <xsl:value-of select="substring-before($text,'&#10;')"/>
     <br/>
     <xsl:call-template name="lf2br">
       <xsl:with-param name="text">
         <xsl:value-of select="substring-after($text,'&#10;')"/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
     <xsl:value-of select="$text"/>
   </xsl:otherwise>
 </xsl:choose>
</xsl:template>

<xsl:template match="prior">

<xsl:for-each select="galleryEntry">

<!-- Insert appropriate Validation 
border-top:1px dotted #787878; border-left: 1px dotted #787878; border-right: 1px dotted #787878; border-bottom:1px dotted #787878;
border-top:1px dotted #787878; border-left: 1px dotted #787878; border-right: 1px dotted #787878; border-bottom:1px dotted #787878;
-->

<div class="body" style="position:relative;width:400px;
padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:5px;
">
<div style="clear:left;padding-top:5px;"><b>
<xsl:value-of select="substring(@duedate,9,2)"/>/<xsl:value-of select="substring(@duedate,6,2)"/>/<xsl:value-of select="substring(@duedate,1,4)"/>
</b></div>
<div class="body_red">
<b>
<a href="/gallery/galleryShow.aspx?gid={@gid}"><xsl:value-of select="@title"/> (<xsl:value-of select="@placeName"/>)</a>
</b>
</div>
<div style="padding-top:5px;">
		<xsl:call-template name="lf2br">
		<xsl:with-param name="text" select="@descr"/>
		</xsl:call-template>
</div>
</div>
<div style="clear:left;height:10px;"><hr/></div>
</xsl:for-each>

<div class="body" style="position:relative;
padding-left:5px;padding-right:5px;padding-top:15px;padding-bottom:15px;
">
<div class="body_red">
<center><b>
<a href="/gallery/oldtimes.aspx">Clicca qui per vedere le foto degli eventi precedenti a Settembre 2003</a>
</b></center>
</div>
<div style="padding-top:5px;">
		<xsl:call-template name="lf2br">
		<xsl:with-param name="text" select="@descr"/>
		</xsl:call-template>
</div>
</div>
<div style="clear:left;height:10px;"><hr/></div>

</xsl:template>

</xsl:stylesheet>